import React, { useEffect } from "react";
import { useAppDispatch, useAppSelector } from "../../app/hooks";
import { fetchAddressList } from "../../app/modules/address/addressSlice";
import { NavLink } from 'react-router-dom'
const Index = () => {
  const dispatch = useAppDispatch();
  const address = useAppSelector((state) => state.address.address);
  useEffect(() => {
    dispatch(fetchAddressList());
  }, []);
  return (
    <div>
      <h5>
				<NavLink to='/address/list'>当前地址： {address?.address}</NavLink>
			</h5>
    </div>
  );
};

export default Index;
